/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2023-08-02
 * Time: 21:25
 */
public class Test4 {
    public static void main(String[] args) {
/*        new Thread(){
            @Override
            public void run() {
                System.out.println("继承 Thread, 重写 run, 使用匿名内部类");
            }
        }.start();*/

/*        new Thread(new Runnable() {
            @Override
            public void run() {
                System.out.println("实现 Runnable, 重写 run, 使用匿名内部类");
            }
        }).start();*/

        Thread t1 = new Thread(() -> {
            System.out.println("使用 lambda 表达式");
        });
        t1.start();
    }
}
